<extend name="template/base_index" />


<block name="area_header">
	<style type="text/css">
		.selected{

			background-color: #326196;
		}
	</style>
</block>

<block name="area_body">
	{:W('Menus/topbar')}
	<div class="admin-main container-fluid">
		{:W('Menus/left')}
		<div class="admin-main-content">
			{:W('Menus/breadcrumb')}
			<!-- 过滤\查询按钮 -->


			<div class="text-center"><h4>规格管理</h4></div>
			<div class="filter-controls">
				<form action="{:U('Admin/Sku/index')}" class="memberForm form-inline hide" method="get">
					<div class="form-group">
						<label class="control-label">规格名称</label>
						<div class="input-group">
							<input class="form-control" value="{$name}" type="text" name="name" placeholder="请输入规格名称" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label"></label>
						<div class="input-group">
							<button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>查询</button>
						</div>
					</div>
				</form>
			</div>

				<!-- 操作按钮 -->
				<div class="btn-controls">
					<a class="btn btn-primary btn-sm" href="{:U('Admin/Sku/add')}">
						<i class="fa fa-plus"></i>{:L('BTN_ADD')}</a>
					<a target-form="selectitem" class="ajax-post confirm btn btn-danger btn-sm" href="{:U('Admin/Sku/bulkDel')}">
						<i class="fa fa-trash-o"></i>选中删除</a>
				</div>

				<!--<volist name="lang_list" id="vo">-->
					<!--<div class="btn-group">-->
						<!--<a class=" <if condition="$vo['value'] eq $lang">selected</if> btn btn-primary btn-sm"  href="{:U('Admin/Sku/index',array('lang'=>$vo['value']))}" >{$vo.name}</a>-->
					<!--</div>-->
				<!--</volist>-->

				<table class="table table-striped table table-hover  table-condensed">
					<thead>
						<tr>
							<th>
								<input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />
							</th>
							<th>
								默认规格名【翻译后】
							</th>
							<th>
								操作
							</th>
						</tr>
					</thead>
					<tbody>
						<empty name="list">
							<tr>
								<td colspan="3" class="text-center">{:L('NO_DATA')}</td>
							</tr>
							<else/>
							<volist name="list" id="vo">
								<tr>
									<td>
										<input type="checkbox" value="{$vo.id}" name="ids[]" class="selectitem" /></td>
									<td>
										<a href="{:U('Admin/Skuvalue/index',array('sku_id'=>$vo['id'],'p'=>I('get.p',0)))}">{$vo.name}
											<empty name="vo['_lang_name']">
												<span style="font-size:12px;color: #FF4400">【未翻】</span>

												<else/>
												<if condition="$vo['_lang_name'] eq $vo['name']">

													<span style="font-size:12px;color: #FF4400">【未翻】</span>
													<else/>
													{$vo._lang_name}
												</if>
											</empty>
											</a>
									</td>

									<td>

										<a href="{:U('Admin/Sku/deleteCateRelation',array('id'=>$vo['id']))}" class="btn btn-sm btn-danger ajax-get confirm"><i class="fa fa-trash"></i>清理类目引用</a>



										<a href="{:U('Admin/Sku/edit',array('id'=>$vo['id'],'cate_id'=>$cate_id))}" class="btn btn-sm btn-default"><i class="fa fa-edit"></i>编辑</a>

										<!--<a href="{:U('Admin/Sku/delete',array('id'=>$vo['id']))}" class="btn btn-sm btn-danger ajax-get confirm"><i class="fa fa-trash"></i>删除</a>-->
										<!--<a href="{:U('Admin/Sku/forceDelete',array('id'=>$vo['id']))}" class="btn btn-sm btn-danger ajax-get confirm"><i class="fa fa-trash"></i>强制删除</a>-->

									</td>
								</tr>

							</volist>
						</empty>
					</tbody>
				</table>
				<div>{$show}</div>
			</div>

		</div>
		<!-- END admin-main-content -->
	</div>
		<!-- END admin-main-->
</block>

<block name="area_footer">

</block>